// Main.java
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        List<CarFactory> factoryList = new ArrayList<>();
        factoryList.add(new BenchiFactory());
        factoryList.add(new BaomaFactory());
        factoryList.add(new FalaliFactory());

        List<Car> carList = new ArrayList<>();
        for (CarFactory factory : factoryList) {
            Car car = factory.createCar();
            carList.add(car);
            System.out.println(car.showName());
        }
    }
}
